home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dr. Windows 3
/
dr win3.zip
/
dr win3
/
WINPROGS
/
MINHLP.ZIP
/
MH.TXT
< prev
next >
Wrap
Text File
|
1993-09-04
|
18KB
|
570 lines
MINIHELP
Create Microsoft Windows Help Files in a flash!
Requirements:
Microsoft Windows
The HC31.EXE help compiler or its equivalent
An ASCII text editor such as QEDIT or NotePad.
Copyright 1993 by Tom Campbell. All Rights Reserved.
You may use MiniHelp any way you like, as long
as you preserve the copyright notices.
This distribution contains:
MH.EXE -- The MiniHelp preprocessor
MH.TXT -- You're reading it!
MC.C -- Source code to MiniHelp
TEST?.HPJ -- Sample help project files.
TEST?.SRC -- Sample MiniHelp source
files.
WHAT IT IS
If you've ever tried to create topic source files for the
Microsoft Windows Help compiler (HC from here on in), you know
it's a pain. Commendably enough, Microsoft has made the input
to HC a subset of RTF or Rich Text Files. Not all word
processor support RTF, though. Even when they do, using RTF
isn't exactly intuitive. Finally, you're probably used to
your own text editor and not all that excited about changing.
MiniHelp works as a go-between, taking its simplified language
as input and creating as output Help-compliant RTF topic
files. It offers only a few commands, a mere fraction of the
rich language that HC understands, but those commands are the
ones you'll use by far the most often. You can create the
first pass using MiniHelp and add things like buttons and
graphics using RTF later, or just stick with MiniHelp.
MiniHelp supports easy-to-use versions of these topic file
features:
- Topic names
- Titles
- Keywords
- Hypertext links
- Font sizing
- Comments
That's pretty much it. I have created complete help systems
using nothing but MiniHelp because it's fast and easy.
You can of course include standard RTF commands within a
MiniHelp script, but once you change the output .RTF file, you
can't read the .RTF file back into MiniHelp to recreate the
MiniHelp source with the changes you added. It's a one-way
process. (Quit complaining. It's free, after all!)
EXAMPLES
Here's a before-and-after example of MiniHelp in action. This
is a minimum help topic file in RTF. It contains a topic
name, a title, and a few words of text.
{\rtf1\ansi \deff2
{\fonttbl
{\f0\froman Times New Roman;}
{\f1\fdecor Courier New;}
{\f2\fswiss Arial;}}
#{\footnote SuperNoteOverview}
${\footnote A SuperNote Overview}
Supernote lets you write several different notes at once.
\page
}
Here's the equivalent file written using MiniHelp:
.topic SuperNoteOverview
.title A SuperNote Overview
Supernote lets you write several different notes at once.
As you can see, even if you have an RTF-capable editor,
MiniHelp source files resemble the organization of Windows
help files much more closely. And there's a lot less to keep
track of. You must remember to end each topic in the RTF file
with a \page command, you must remember to end the RTF file
itself with a closing curly brace, you must remember to end
font names with a semicolon, etc. MiniHelp lets you forget
all that and concentrate on getting the job done.
The example above lacked a feature or two, notably keywords
and hypertext links. Here's a multitopic help file with table
of contents, keywords, titles, and hypertext links.
.topic TOFC
.title Table of Contents
Table of Contents
{Find a file anywhere on the disk with FF.EXE:FileFind}
{Finding Today's Files with All2Day:All2day}
.topic FileFind
.title Find Files on Your Disk
.keyword FF.EXE;FileFind;files, finding;finding files
FileFind, or FF.EXE, lets you find files
anywhere on your disk. Use it in conjunction with
{ALL2DAY.EXE:all2day}, which lets you find all
the files you created today.
See also {Table of Contents:TOFC}
.topic All2Day
.title Finding the Files You Created Today
.keyword All2Day;ALL2DAY.EXE;Today
Whereas {FileFind (FF.EXE):FileFind} searches for the specfied
file anywhere on your hard disk, All2Day searches the
default disk for all files created today.
See also {Table of Contents:TOFC}
This may look a bit complex, and it is. But compare it to the
RTF version:
{\rtf1\ansi \deff2
{\fonttbl
{\f0\froman Times New Roman;}
{\f1\fdecor Courier New;}
{\f2\fswiss Arial;}
}
#{\footnote TOFC}
${\footnote Table of Contents
}
\par
{\uldb Find a file anywhere on the disk with FF.EXE}{\v FILEFIND}
\par
{\uldb Finding Today's Files with All2Day}{\v ALL2DAY}
\par
\page
#{\footnote FileFind}
${\footnote Find Files on Your Disk}
K{\footnote FF.EXE}
K{\footnote FileFind}
K{\footnote files, finding}
K{\footnote finding files}
FileFind, or FF.EXE, lets you find files
anywhere on your disk. Use it in conjunction with
{\uldb ALL2DAY.EXE}{\v ALL2DAY} , which lets you find all
the files you created today.
\par
See also {\uldb Table of Contents}{\v TOFC}
\par
\page
#{\footnote All2Day}
${\footnote Finding the Files You Created Today}
K{\footnote All2Day}
K{\footnote ALL2DAY.EXE}
Whereas {\uldb FileFind (FF.EXE)}{\v FILEFIND} searches for the specfied
file anywhere on your hard disk, All2Day searches the
default disk for all files created today.
\par
See also {\uldb Table of Contents}{\v TOFC}
\page
}
As you can see, keeping track of all those nested curly braces
and backslash commands gets old fast. MiniHelp can save you
from all that.
CHAPTER 1. OVERVIEW
MiniHelp creates help topic files. A topic file contains one
or more of the following:
1. A topic
2. A title
3. Keywords (optional, but strongly recommended)
4. The topic text itself
You can have multiple topics in a topic file. The only
constraint is that topics be given unique names. Titles are
not so constrained.
The Microsoft Help Compiler (HC) doesn't use the topic file
directly, however. You give it the name of a help project file
instead. The help project file has a default extension of .HPJ
and contains a list of the topic files.
There's a lot going on in a help project file, but you can
safely ignore all but the [FILES] section. That's the section
that names the topic files. Here's an example of a complete
help project file named TEST1.HPJ:
[FILES]
TEST1A.RTF
You have to create the project file yourself; MiniHelp can't do
it because it doesn't know what files are in the project. The
files listed must include full pathnames with extensions.
Normally, you'll have only one project per directory and keep
all the topic files in that directory. In some cases you might
not want it that way; for example, if you have a standard help
topic file for the File menu with such unchanging features as
Save As, Print Setup, and so on, you might wish to keep them in
a common directory to avoid duplicated effort and maintainence
problems.
HC "automatically" creates a table of contents; it's whatever
happens to appear on the first screen of the topic. See
TEST2.* for an example.
At any rate, include all of the topic files in your help
project file. They may include cross-file references; that is,
a topic doesn't have to be in file A as long as it appears in
file B.
The next chapter shows you how to create the topic files using
MiniHelp.
CHAPTER 2. CREATING A MINIHELP SOURCE FILE
MiniHelp source files contain the text of the help, "dot
command